import requests

# 创建 session对象
session = requests.Session()

# 发送 验证码请求 get
session.get(url="http://hmshop-test.itheima.net/index.php?m=Home&c=User&a=verify")

# 发送 登录请求 post
resp = session.post(url="http://hmshop-test.itheima.net/index.php?m=Home&c=User&a=do_login",
                    data={"username": "15727597562", "password": "HZCwasd123", "verify_code": "8888"})

# 打印响应结果
print("登录结果：", resp.json())